package com.yanqu.road.logic.bussiness.activity;

import com.yanqu.road.entity.activity.game.ActivityPageantInfo;
import com.yanqu.road.entity.player.UserPageantData;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.List;
import java.util.Map;

public class PageantBussiness {

    /**
     * 用户登陆加载数据
     */
    public static Map<Integer, UserPageantData> getUserGameInfo(long userId) {
        return DaoHelper.getUserGameDaoImpl().getUserGameInfo(userId);
    }

    /**
     * 新增数据
     *
     * @param data
     * @return
     */
    public static boolean addUserInfo(UserPageantData data) {
        return DaoHelper.getUserGameDaoImpl().add(data);
    }

    /**
     * 更新数据
     */
    public static boolean updateUserInfo(UserPageantData data) {
        return DaoHelper.getUserGameDaoImpl().update(data);
    }


    /**
     * 获取活动配置表数据
     */
    public static List<ActivityPageantInfo> getPageantConfig(int activityId) {
        return DaoHelper.getUserPageantConfigDaoImpl().getActivityPageantConfig(activityId);
    }

}
